projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c72589f
)
video: Pause on unset too
author
Matthias Clasen
<mclasen@redhat.com>
Sat, 2 Jan 2021 05:06:41 +0000
(
00:06
-0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Sat, 2 Jan 2021 06:33:48 +0000
(
01:33
-0500)
When new media stream is set on the GtkVideo
widget and we're autoplaying, pause the old one.
Otherwise, the music keeps playing unexpectedly.
gtk/gtkvideo.c
patch
|
blob
|
history
diff --git
a/gtk/gtkvideo.c
b/gtk/gtkvideo.c
index 7eee5fd5ba6305377f6b264ac5217ce400d29932..8258e251455c14c37f065e4f7df5e35e066b461b 100644
(file)
--- a/
gtk/gtkvideo.c
+++ b/
gtk/gtkvideo.c
@@
-593,6
+593,8
@@
gtk_video_set_media_stream (GtkVideo *self,
if (self->media_stream)
{
+ if (self->autoplay)
+ gtk_media_stream_pause (self->media_stream);
g_signal_handlers_disconnect_by_func (self->media_stream,
gtk_video_notify_cb,
self);